/*
 * @Descripttion: 翻牌器组件配置文件
 * @version:
 * @Author: Your Name
 * @Date: 2025-11-06
 * @LastEditors: Your Name
 * @LastEditTime: 2025-11-06
 */
export const widgetFlipper = {
  code: "widget-flipper",
  type: "text",
  tabName: "文本栏",
  label: "翻牌器",
  icon: "iconziyuan",
  options: {
    // 配置
    setup: [
      // 基本设置
      {
        type: "el-input-text",
        label: "图层名称",
        name: "layerName",
        required: false,
        placeholder: "",
        value: "翻牌器",
      },
      {
        type: "el-input-textarea",
        label: "初始数值",
        name: "text",
        required: false,
        placeholder: "",
        value: "100000",
      },

      // 文本内容
      {
        type: "el-input-text",
        label: "前缀",
        name: "prefix",
        required: false,
        placeholder: "",
        value: "",
      },
      {
        type: "el-input-text",
        label: "后缀",
        name: "suffix",
        required: false,
        placeholder: "",
        value: "",
      },

      [
        {
          name: "字体样式",
          list: [
            // 字体样式
            {
              type: "el-input-number",
              label: "字体大小",
              name: "fontSize",
              required: false,
              placeholder: "",
              value: "32",
            },
            {
              type: "vue-color",
              label: "字体颜色",
              name: "color",
              required: false,
              placeholder: "",
              value: "#FAD400",
            },
            {
              type: "vue-color",
              label: "背景颜色",
              name: "background",
              required: false,
              placeholder: "",
              value: "rgba(0,0,0,0)",
            },
            {
              type: "el-select",
              label: "文字粗细",
              name: "fontWeight",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "normal", name: "正常" },
                { code: "bold", name: "粗体" },
                { code: "bolder", name: "特粗体" },
                { code: "lighter", name: "细体" },
              ],
              value: "normal",
            },
            {
              type: "el-select",
              label: "字体系列",
              name: "fontFamily",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "Arial, sans-serif", name: "Arial" },
                { code: "'Microsoft YaHei', sans-serif", name: "微软雅黑" },
                { code: "'SimHei', sans-serif", name: "黑体" },
                { code: "'SimSun', serif", name: "宋体" },
                {
                  code: "'Helvetica Neue', Helvetica, Arial, sans-serif",
                  name: "Helvetica",
                },
                {
                  code: "'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif",
                  name: "苹方",
                },
                { code: "monospace", name: "等宽字体" },
                { code: "cursive", name: "草书字体" },
                { code: "fantasy", name: "装饰字体" },
              ],
              value: "Arial, sans-serif",
            },
            {
              type: "el-select",
              label: "对齐方式",
              name: "textAlign",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "center", name: "居中" },
                { code: "left", name: "左对齐" },
                { code: "right", name: "右对齐" },
              ],
              value: "center",
            },
          ],
        },
        {
          name: "数值格式",
          list: [
            // 数值格式
            {
              type: "el-input-number",
              label: "动画时长(ms)",
              name: "duration",
              required: false,
              placeholder: "",
              value: 1000,
            },
            {
              type: "el-input-number",
              label: "小数位数",
              name: "decimal",
              required: false,
              placeholder: "",
              value: 0,
            },
            {
              type: "el-switch",
              label: "千分位分隔符",
              name: "thousandth",
              required: false,
              placeholder: "",
              value: false,
            },
          ],
        },
        {
          name: "发光效果",
          list: [
            // 发光效果
            {
              type: "el-switch",
              label: "文字发光效果",
              name: "textGlow",
              required: false,
              placeholder: "",
              value: false,
            },
            {
              type: "vue-color",
              label: "发光颜色",
              name: "glowColor",
              required: false,
              placeholder: "",
              value: "#FAD400",
              relationFields: ["textGlow"],
            },
            {
              type: "el-input-number",
              label: "发光强度",
              name: "glowIntensity",
              required: false,
              placeholder: "",
              value: 10,
              relationFields: ["textGlow"],
            },
          ],
        },
        {
          name: "容器边框",
          list: [
            // 容器边框
            {
              type: "el-input-number",
              label: "边框宽度",
              name: "borderWidth",
              required: false,
              placeholder: "",
              value: "0",
            },
            {
              type: "vue-color",
              label: "边框颜色",
              name: "borderColor",
              required: false,
              placeholder: "",
              value: "rgba(30, 144, 255, 1)",
            },
            {
              type: "el-select",
              label: "边框类型",
              name: "borderStyle",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "solid", name: "实线" },
                { code: "dashed", name: "虚线" },
              ],
              value: "solid",
            },
            {
              type: "el-input-number",
              label: "边框圆角",
              name: "borderRadius",
              required: false,
              placeholder: "",
              value: "0",
            },
          ],
        },
        {
          name: "数字边框设置",
          list: [
            // 数字边框
            {
              //digitBorderEnabled
              type: "el-switch",
              label: "数字边框",
              name: "digitBorderEnabled",
              required: false,
              placeholder: "",
              value: false,
            },
            {
              //digitBorderWidth
              type: "el-input-number",
              label: "数字边框宽度",
              name: "digitBorderWidth",
              required: false,
              placeholder: "",
              value: "2",
              relationFields: ["digitBorderEnabled"],
            },
            {
              type: "vue-color",
              label: "数字边框颜色",
              name: "digitBorderColor",
              required: false,
              placeholder: "",
              value: "rgba(144, 238, 144, 1)",
              relationFields: ["digitBorderEnabled"],
            },
            {
              type: "el-select",
              label: "数字边框类型",
              name: "digitBorderStyle",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "solid", name: "实线" },
                { code: "dashed", name: "虚线" },
              ],
              value: "solid",
              relationFields: ["digitBorderEnabled"],
            },
            {
              type: "el-input-number",
              label: "数字边框圆角",
              name: "digitBorderRadius",
              required: false,
              placeholder: "",
              value: "1",
              relationFields: ["digitBorderEnabled"],
            },
            {
              // digitPadding
              type: "el-input-number",
              label: "数字边框内边距",
              name: "digitPadding",
              required: false,
              placeholder: "",
              value: "1",
              relationFields: ["digitBorderEnabled"],
            },
            {
              // digitMargin
              type: "el-input-number",
              label: "数字边框外边距",
              name: "digitMargin",
              required: false,
              placeholder: "",
              value: "1",
              relationFields: ["digitBorderEnabled"],
            },
            {
              //nonDigitBorderEnabled - 新增控制非数字字符边框显示的开关
              type: "el-switch",
              label: "非数字边框",
              name: "nonDigitBorderEnabled",
              required: false,
              placeholder: "",
              value: false,
              relationFields: ["digitBorderEnabled"],
            },
          ],
        },
      ],
    ],
    // 数据
    data: [
      {
        type: "el-radio-group",
        label: "数据类型",
        name: "dataType",
        require: false,
        placeholder: "",
        selectValue: true,
        selectOptions: [
          {
            code: "staticData",
            name: "静态数据",
          },
          {
            code: "dynamicData",
            name: "动态数据",
          },
        ],
        value: "staticData",
      },
      {
        type: "el-input-number",
        label: "刷新时间(毫秒)",
        name: "refreshTime",
        relactiveDom: "dataType",
        relactiveDomValue: "dynamicData",
        value: 5000,
      },
      {
        type: "el-button",
        label: "静态数据",
        name: "staticData",
        required: false,
        placeholder: "px",
        relactiveDom: "dataType",
        relactiveDomValue: "staticData",
        value: "0",
      },
      {
        type: "dycustComponents",
        label: "",
        name: "dynamicData",
        required: false,
        placeholder: "px",
        relactiveDom: "dataType",
        relactiveDomValue: "dynamicData",
        dictKey: "refreshTime",
        value: "",
      },
    ],
    // 坐标
    position: [
      {
        type: "el-input-number",
        label: "左边距",
        name: "left",
        required: false,
        placeholder: "px",
        value: 0,
      },
      {
        type: "el-input-number",
        label: "上边距",
        name: "top",
        required: false,
        placeholder: "px",
        value: 0,
      },
      {
        type: "el-input-number",
        label: "宽度",
        name: "width",
        required: false,
        placeholder: "该容器在不同分辨率下宽度将按适配度缩放",
        value: 200,
      },
      {
        type: "el-input-number",
        label: "高度",
        name: "height",
        required: false,
        placeholder: "该容器在不同分辨率下高度将按适配度缩放",
        value: 80,
      },
    ],
  },
};
